class Subject {
  constructor(public subid: number, public subname: string) {}
}

let chineseSubject = new Subject(100, "语文");
let mathSubject = new Subject(101, "数学");
let engliseSubject = new Subject(101, "英语");
let setZhangSanSubject = new Set([chineseSubject, mathSubject]);

type MySet<T extends Set<any>> = T extends Set<infer R> ? R : never;
type MySetTest = MySet<typeof setZhangSanSubject>;

const test: MySetTest = chineseSubject;
export {};
